/*
package com.cn.springcloudapi.fallback;

import com.cn.springcloudapi.inter.TestFallbackApi;
import com.cn.springcloudapi.model.URole;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Component
public class TestFallback implements  FallbackFactory<TestFallbackApi> {
    private static final Logger LOGGER = LoggerFactory.getLogger(TestFallback.class);


    @Override
    public TestFallbackApi create(Throwable e) {
       return new TestFallbackApi() {
            @Override
            public String getHi(String name, URole uRole) {
                return  e.getMessage();
            }

            @Override
            public String set(HttpServletRequest request, HttpServletResponse response) {
                return  e.getMessage();
            }

            @Override
            public String get(HttpServletRequest request, HttpServletResponse response) {
                return  e.getMessage();
            }
        };
    }
}
*/
